package xhwl.insurance.http.api;

import com.google.gson.Gson;

import okhttp3.RequestBody;
import rx.Observable;
import xhwl.android.common.util.SPUtil;
import xhwl.insurance.http.ApiService;
import xhwl.retrofitrx.BaseApi;

public class WithDrawApplyApi extends BaseApi {
    WithDrawApplyReq req;

    public WithDrawApplyApi() {
        req = new WithDrawApplyReq();
    }

    @Override
    protected Observable getObservable() {
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(req));
        return retrofit.create(ApiService.class).applywithdraw(requestBody);
    }

    class WithDrawApplyReq {
        /**
         * link_mobile :"13717922739",
         */

        private String link_mobile;

        public WithDrawApplyReq() {
            this.link_mobile = SPUtil.getPersonInfoSp().getString(SPUtil.SPPersonInfo.LINK_MOBILE, "");
        }
    }
}
